<template>
	<view>
		<div class='setBox'>
			<u-cell-group>
				<u-cell	title="消息设置"  :isLink="true" url='/pages/Center/Set/setMsg'></u-cell>
				<u-cell	title="自动回复"  :isLink="true" url='/pages/Center/Set/setAuto'></u-cell>
				<u-cell	title="系统权限"  :isLink="true" url='/pages/Center/Set/setPrivilege'></u-cell>
				<u-cell	title="安全中心"  :isLink="true" url='/pages/Center/Set/setSave'></u-cell>
				<u-gap height="6" bgColor="#F4F4F4"></u-gap>
				<u-cell	title="清理缓存"  :isLink="true" url=''></u-cell>
			</u-cell-group>
			<div class='logout'>
				<u-button color='#FC332E' text="退出登录" size="large" @click='logout'></u-button>
			</div>
		</div>
		<u-modal
			:content="content"
			:show="show"
			showCancelButton
			closeOnClickOverlay
			@confirm="confirm"
			@cancel="cancel"
			@close="close"
		></u-modal>
	</view>
</template>

<script>
	export default{
		data(){
			return{
				show:false,
				content: '确认退出该账号？',
			}
		},
		methods:{
			logout(){
				this.show = true
				
			},
			confirm() {
				this.show = false
				// console.log('confirm');
				uni.clearStorageSync();
				uni.reLaunch({
					url:'/pages/Center/login'
				})
			},
			cancel() {
				this.show = false
				// console.log('cancel');
			},
			close() {
				this.show = false
				// console.log('close');
			}
		}
		
	}
</script>

<style lang="scss" scoped>
	page{
		background-color: #F4F4F4;
	}
	.setBox{
		background-color: #fff;
		margin-top: 50upx;
		.logout{
			padding: 20upx;
			background-color: #F4F4F4;
		}
	}
</style>